vtortola's Q&A profile
Visual Studio Express Editions Highlighting text
How can I find the text within text box and highlight it For example: I write "text highlight" in text box and in other box I write "high" for searching in first box. Thanks. It's working, thanks a lot! Edit: I have cut some parts of code I wont use and I got this (code for highlighting on same form with one RTB, textbox and button) Dim count As Integer = 0 Dim wordat As Integer Do While wordat <> -1 wordat = Me .RichTextBox1.Find(TextBox1.Text, wordat, RichTextBoxFinds.WholeWord) If wordat = -1 Then Me .RichTextBox1.ScrollToCaret() Exit Do Else Me .RichTextBox1.Select(wordat, TextBox1.Text.Length) If sender Is Bu ...Show All
Visual J# interoperability of java components and the rest of .net
I have the following problem: I have to redesign a large Java 1.1 application. With Microsoft decommisioning their JVM in December 2007, I am thinking to do the redesign in .NET. There is substaintial piece of code in the existing app, which I want to reuse. Yet, I would like to use some native C# windows components (from System.Windows.Forms). To the best of my knowledge there is no way to drop a Java component (derived from java.awt.Component) into a System.Windows.Forms.Form... right Any ideas Thanks! I see you declared the jButton variable, but you don't use it. Can you put the jButton on the windows form ;) This is my problem... Thanks, Kamen ...Show All
Software Development for Windows Vista how to change the text shown when dragging activities from the toolbox
Can someone please explain, how I can programmatically change the text, that is shown, when I drag activities onto the designer surface By default, the class name is shown (for example in the designer rehosting example). No, I think the workflow designer is the same. It does not matter if you host it in VS or in your app. But the text shown, when dragging items from the toolbox seems to be derived from the ToolboxItem instance. The designer displays the text but the ToolboxItem decides which text is shown. However, I am not sure. Can anyone please explain, HOW TO CHANGE THE TEXT SHOWN WHEN A TOOLBOXITEM IS DRAGGED over the workflow designer Thanks for your help so far. ...Show All
Windows Forms Use which platform to develop GUI?
My only experience with programming is using C++ and I learn a bit of MFC previously. I'm supposed to develop a powerful GUI, but with so many options available, I'm confused which platform I should use, MFC C# Basic Any advice is greatly appreciated. ok, i think i will use MFC to deliver something to my boss in a month's time. In the long run, what is the apt platform to use It seems that using WPF is risky since it is a beta. ...Show All
Visual Studio 2008 (Pre-release) Creating popup panels like Blend
What would be the best way to go about creating 'popup panels' like Blend does when you click on one of the tools on the left side In Blends case it looks like it's a Menu but I'd like to be able to have any Control magically appear, allow the user to interact with it, and then disappear. For example, I have a color rectangle in my app. If the user clicks on it, i'd like a color selector control to magically appear. The user can then interact with the control and then click anywhere outside of the control to close it. Is something like this built into WPF I've tried just manually creating a control but I'm having trouble with getting the popup to automatically close when the user clicks anywere else. Hooking both LostFocus and LostKeybo ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How do i turn off anti-aliasing?
I know this is an easy answer but i just cant find it. I remember something about being able to set a property in beta1 with the graphics designer. I was looking all over in beta2 and i cant find it. thanks in advanced. yeah where is that and how would i use turn on i did like this GraphicsDeviceManager graphics; GraphicsDevice.RenderState.MultiSampleAntiAlias = true; ContentManager content; but did not work ...Show All
Smart Device Development How to make the application start with system
Hello,everyone: I want to make my program run when the system boot. So how can I do that by code Any APIs or sample codes Well,then sometimes I do not want the application start with the system,and smoetimes I do.So may I switch the selections in my program My question is how can I remove the shortcut from windows startup folder when I don't want the application start with system ...Show All
Visual Studio 2008 (Pre-release) Where is my dropshadow?
Take a look and tell me what you think The dropshadow is not showing on the border bitmapeffect of the Popup. <Style x:Key="ComboBoxStyle" TargetType="ComboBox"> <Setter Property="SnapsToDevicePixels" Value="true"/> <Setter Property="OverridesDefaultStyle" Value="true"/> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/> <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/> <Setter Property="ScrollViewer.CanContentScroll" Value="true"/> <Setter Property="MinWidth" Value="120"/> <Setter Proper ...Show All
Visual C# Passing Extra parameters to events
Can anyone suggest me to pass more parameters other than two parameter for events like the following Event: OnMouseMove(object sender, MouseEventArgs e)" Event handler: this.MouseUp += new System.Windows.Forms.MouseEventHandler(OnMouseUp); Not sure what you're trying to achieve, but one solution is to have your own custom class that inherits from MouseEventArgs and has additional properties that represent the data you want to pass as additional parameters. Then pass an instance of the custom class when raising the event. This is more consistent with .NET Framework events than adding additional parameters. If you're raising a custom event in your own event class, you can define a delegate that takes your custom MouseEventA ...Show All
Windows Forms Resizing a control problem in design mode
I have created a UserControl and a designer for it and I am having problems with the adornments drawing incorrectly when resizing the control in design mode. When resizing the control, the adornments are drawn to the original control bounds and not to the resized control bounds. If I select something else, and reselect the control, the adornments draw correctly. Here is how I am declaring the UserControl: [ Designer ( typeof ( UserControl1Designer ))] public partial class UserControl1 : UserControl { public UserControl1() { InitializeComponent(); } } Here is the designer code: class UserControl1Designer : System.Windows.Forms.Design. ControlDesigner { protected override void PostFilterProper ...Show All
Windows Forms How to disable the ContextMenuStrip in the TextBox associated with a ComboBox?
I need to disable the ContextMenuStrip in the TextBox associated with a ComboBox for a smoother functionality. Right clicking on the CombBox button will open a ContextMenuStrip that I can disable, rightclicking on the TextBox associated with the will always bring up the standard TextBox ContextMenuStrip. I can't find access to the ContextMenuStrip in the TextBox to disable that. Anyone know a way to retrieve either a handle to the TextBox or the ContextMenuStrip inside a ComboBox Try overriding WndProc and wait for wm_rbuttondown messages (and wm_rbuttonup) and cancelling them out. If Not m.Msg = Wm_RBUTTONDOWN and not m.msg = WM_RBUTTONUP then mybase.wndproc(m) end if I think you could wa ...Show All
SQL Server scheduling snapshot and synchronization is missing on the generate scripts
hello all, i need to bring down the entire replication solution but just before i do that i need to script. The EM has a generate script feature but it lacks the schedule for snapshot generation and synchronization by the way, whats the fastest way of melting the entire replication solution and then brinnging them back again. Can i do replication backup and restore regards, joey use <published db name> exec sp_removedbreplication <published db name> go use master sp_dropdistributor 1 go You can use sp_removedbreplication on the subscriber database as well, and if you have a remote distributor, you can run sp_dropdistributor 1 to remove the distributor. After ...Show All
Visual Studio Tools for Office Reading pane previewer in Outlook 2007
Hi, how can I write (and register) my own previewer for attachments Any tutorials available Thanks Writing a preview handler that works in Outlook 2007 is the same process as writing one that works for the Explorer shell. The registration mechanism and interfaces are all handled the same. There is some available documentation for how to write a previewer handler in the Vista SDK, http://msdn2.microsoft.com/en-gb/library/aa969368.aspx . Also, in the Jan. issue of MSDN Magazine there is an article with a complete framework for writing preview handlers using C# which makes the whole process pretty easy. However, this framework creates an in-process preview handler that only works on Vista. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Is there any way to tell if a sampler has a texture attached in shaders?
Is there any way to tell if a sampler has a texture attached in shaders The default behavior is getting black when no texture attached but I want it to be some other color. No, there is not such functionality available in shader. If you want to use other color, just attach 1x1 sized texture in your code when no texture is needed. I think such things were actually used for emulating "default" black behaviour in some older HW. ...Show All
Visual Studio Express Editions how to build?
Hi all, can u plz tell me how to write a c# program to do this.. -> I am having one VC++ application. -> This vc++ is application contains 2 projects. -> how to write a c# program to build that VC++ application. plz give me reply.. Thanks --hanu Hi, Actually my Idea why I am asking this thing is.. I have one large VC++ application. To build that application in single system it will take more time. So I want to build that application using Grid technology. So I need to create the VC++ application in to C# threads. So that each thread will be executed in different systems. now can u plz tell me how to write a c# program to devide that VC++ application into threads, with out modifying VC++ applica ...Show All
