|
I just change some registery setting
HKEY_CLASSES_ROOT\Directory\Shell to enable select a folder and right click to launch my application with the select folder path as parameter
myapplication.exe %l
it works fine with one folder selected, however when selecting multiple folders and rightclick to launch the application two applications are launching. what can i do?
Shin
|
|
|
|
|
I take it you only want one instance of your application to run no matter how many times it is launched?
Your app is going to have to check to make sure it is the only instance running. It is also going to have to implement some method of communication so you can pass an object, probably containing a String with your filename, from one instance to another.
MSDN has this[^] article that explains one method of doing this. There is a second article[^] that follows up on the first with a bug fix.
Also, CodeProject has this[^] article that takes a different approach.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave,
Thanks for the info and
it is helpfull.
Shin
|
|
|
|
|
Another way would be to create a passer app.
Right-click brings (hidden) start.exe which starts main.exe with info.
Right-click brings (hidden) start.exe which feeds main.exe with info.
The start.exe only feeds main.exe with the info and then quits.
Simply write the info in a file that main.exe opens and monitors.
Why invent the wheel, when you can invent software.
|
|
|
|
|
This in not the method used by other applications with the same capabilities. The methods mentioned in my previous post are the ones used by professional applications simply because those methods are fool proof, easily maintainable, and above all else, supportable.
The target app would have to poll this file on a seperate thread so the user interface would respond. A feature that would be rarely used in the real world, but code would be running for it constantly.
This Start.exe would also have to poll the Process list, every time it was launched, to see if it's target app is running.
While it would work, with a couple holes in it, it's a messy solution...
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
If anyone is interested, this is a link to a document at Microsoft's Patterns and Practices - Improving .NET Application Performance and Scalability[^].
The document is a HUGE guide (about 1,120 pages) full of tips, samples, howto's, and checklists for improving the performance of your code using ASP.NET, ADO.NET, Web Services, ... This doc isn't just for professional coders either. The Noobies can get a bunch of information out of it too. Just reading Chapter 12 on 'Improving ADO.NET Performance' can answer a bunch of the recurring questions on the forums.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How can I change the layout of the keyboard dynamically(e.g from English character to French) in VB .Net
|
|
|
|
|
It can be done, but is not a recommended practice...
Your app can set it's own Keyboard Layout (seperate from the systems) using the ActivateKeyboardLayout , LoadKeyboardLayout , GetKeyboardLayoutList , GetKeyboardLayoutName , and UnloadKeyboardLayout Win32 API functions. The functions will have to be P/Invoked from user32.dll. The constants and structures used be these functions can be found in winuser.h.
Docs on all this stuff start here[^] on MSDN.
[EDIT]
Oh! There is nothing in the .NET BCL that can do this. You must use the Win32 API functions...
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Im in vb.net school.I have read the intoductory book.
I have a little question.
how can i save my data in the registry and use it again.
thanks.
Go forward and never Stop....
|
|
|
|
|
ymohd wrote:
I have a little question.
how can i save my data in the registry and use it again.
thanks.
The registry isn't a recommended way of saving data in .NET, but all the information you need on reading/writing the registry is part of the namespace/class Microsoft.Win32.Registry .
If you do a search on MSDN for that term, you should find some VB.NET examples.
Michael
CP Blog [^]
|
|
|
|
|
Hi Dear...
I struck in a problem & I know you can help me..
I've a pro-merchant account in amazon..& I want to upload Inventory to amazon.. but getting problem..File Error..even from site upload...
Can you send me Execl file you used for that uploading...
+ if possible some coding snippet of uploading invenorty. I want to upload through coding.. send me at:
sumit_kapoor1980@hotmail.com
or chat with me at hotmail account or yahoo: sumit_kapoor1980@yahoo.com
I hope you will help me..
Thanks
Have a Nice Life..
Sumit Kapoor.
---Sumit Kapoor---
|
|
|
|
|
Hi,
On click of Combo box i want another control to open say dbgrid or listview whatever, which will have the remaining values of the table. in combo only one code value will be seen and filled and when i click on the combo it should display me grid showing other values of the table.
Is there any ready made control ready or any start to the making of this control
thanks
Be Humble in Victory and Strong in Defeat. -Het
|
|
|
|
|
Combobox and remaining values of a Table on a DataGrid????????? I fail to see how the ComboBox fits in with the Table...
Are you binding the ComboBox and DatGrid to a DataTable? I don't get why you would pick a record from a table to display in a ComboBox, and then display only the remaining records in a DataGrid.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
its like when i click on combo, instead of normal values filled in the combo, it should display me the the grid which will have other values also apart from the value which is displayed in the combo's text.
actually i got the thing it is at this link
you will get it
http://www.thecodeproject.com/vb/net/multicolumncombo.asp
thanks for the help man
Be Humble in Victory and Strong in Defeat. -Het
|
|
|
|
|
Hi,
I am facing a problem with the handling of ESC key in user controls
created in VB.
I have a multiline text box in the control. Also the text box is enabled
since I have to select/copy text in it.
Next I place the control in an MFC dialog. I do not need OK and Cancel
buttons on it and so I remove them and the corresponding handlers. Now,
when I click in the text box and then press ESC key, the text box
disappears and the application crashed.
Strangely, when I used the control in a VB form this problem was not
occuring.
I am using VB 6.0 and VC++ 6.0.
If any can let me know how this may be resolved with VC++, it is greatly
appreciated.
Thanks in advance
vinay
|
|
|
|
|
You wrote a control in VB6 and are using it in a VC++ 6 app? Am I correct?
I'd would start looking through the C++ code to find where the problem is. We really can help you without code samples and an actual error message. You've given us nothing but a black box and told us "it's broken"... On top of that, this forum really doesn't do VC++ code. You'd have to post the question on the VC++ forum.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Can anybody show me how to use this Icon Constructor successfully?
public sub New(type as System.type, resource as string)
???
|
|
|
|
|
Hi all..
Iam new to this subject..I want to develop a component in vb.net which can read the values from the registry,set the values in the regidtry and must be able to delete the registry values..can anyone help me out...
|
|
|
|
|
It's already been done a million times... See this[^] for a list of articles here on CodeProject.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
You need to look at the namespace/class Microsoft.Win32.Registry
Michael
CP Blog [^]
|
|
|
|
|
ok. im calling a method of my c++ class (active x DLL) from visual basic.
this method call works fine, if there is a single parameter. when i try
to add 2 parameters visual basic says its expects a '=' sign after the call.
the VB call: tp.nothing(i,variable1)
tp.nothing is (id as Integer, string as String)
IDL:
[id(7), helpstring("method nothing")] HRESULT nothing(short *id, BSTR *string);
any ideas why the VB call returns a syntax error???
thanks!
|
|
|
|
|
beerc0der wrote:
the VB call: tp.nothing(i,variable1)
I'm assuming this is VB6? You might want to try:
tp.nothing i, variable1
without the parenthesis. If your not getting a return variable, VB6 doesn't want the parenthesis, but if you are returning a value, you put them around the functions arguments. Wierd and inconsistent, but that's what it wants...
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
thx for the help. no parenthesis.... hilarious....
|
|
|
|
|
Have a nice try with Why! Why! Why!
Best Regards,
Ahmad Rifai Yusuf
|
|
|
|
|
Hey,
I'm a graphics newbie. I built an app with a single form, and a set of controls in it. Now I want to be able to use GDI calls like drawline to draw visual links between these controls. When I use the Paint event of the form, I get a line that goes under my controls, not over it. Is there a way to get the graphics to lie on top of the controls? Additionally, what's the easiest way to make those graphics go away when they are no longer needed?
Thanks!
Mike Hammond
Apprentice VB Guy
|
|
|
|