|
The double clicked file name will be passed as the first argument into your app's Main function. If you don't have a Main, then I suggest that you create one as shown below. You'll also need to change your project's Startup Object to "Sub Main".
Public Class Main
Public Shared Sub Main(ByVal args() As String)
Dim fileName As String = String.Empty
If (args.Length > 0) Then
' File was double clicked on.
fileName = args(0)
EndIf
End Sub
End Class
There is more info on this subject in this forum. Just do a search.
-- modified at 17:30 Thursday 30th March, 2006
Fixed mistake in the above code. I wrote it a little too quickly.
|
|
|
|
|
thanks man...
Joshua Quick wrote: There is more info on this subject in this forum. Just do a search.
ja buth i have slow internet!!! i am from croatia.
<blink>FeRtoll Software.net
------------
E-Mail me
WebPage
|
|
|
|
|
FeRtoll wrote: a buth i have slow internet!!!
What a lot of crap[^]!
Slow internet does NOT mean you can't do basic searches on The Code Project or Google or <insert your="" favourite="" search="" engine="" name="" or="" website="" here="">. The searches are performed on the web servers - not your machine.
This reminds me of an old English proverb - "a bad tradesman always blames his tools".
FeRtoll wrote: i am from croatia.
Why does this matter?
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
ummmmmmm i did on properties ˇ
Joshua Quick wrote: You'll also need to change your project's Startup Object to "Sub Main".
and i inserted new class
and copy your code buth it says...
No accessible 'Main' method with an appropriate signature was found in 'NodeDraw'.
~
<blink>FeRtoll Software.net
------------
E-Mail me
WebPage
|
|
|
|
|
If you were not such a smartass all the time, I might have stopped to try and help you with this.
|
|
|
|
|
Oops. I made a mistake.
The Main() method needs to be marked as Shared.
Public Shared Sub Main(ByVal args() As String)
|
|
|
|
|
|
Hey guys! I am a rookie having a problem and need your help. I am trying to run the SMS ClientAction script below on a list of targeted machines (using a .TXT file) but I can't get it to execute the .VBS on the targeted machines,instead the .VBS is only executing and pulling back results of the local machine the number of times it see's a targeted machine.
For example if I have 5 machines targeted, it will pull back the results of the local machine 5 times. I am trying to have the results show the Machine Name and the Count. I have the .vbs & .bat. listed below. I'd appreciate any help you can give.
=========.vbs file=========
dim oCPAppletMgr 'Control Applet manager object
dim oClientAction ' Individual client action
dim oClientActions ' A collection of client actions
dim iCount 'Number of actions
'Get the Control Panel applet manager object
set oCPAppletMgr=CreateObject("CPApplet.CPAppletMgr")
if err.number<>0 then
Wscript.echo "Couldn't create control panel application manager"
Logging(FSO)
end if
'Get a collection of actions
set oClientActions=oCPAppletMgr.GetClientActions
if err.number<>0 then
wscript.echo "Couldn't get the client actions"
set oCPAppletMgr=nothing
end if
wscript.echo oClientActions.Count
'Display each client action
For iCount = 1 to oClientActions.Count
set oClientAction=oClientActions.Item(iCount)
next
set oClientActions=nothing
set oCPAppletMgr=nothing
=========batch file==========
set log=Log.csv
if /i exist oldlog.csv del oldlog.csv
if /i exist "%log%" ren "%Log%" oldlog.csv
echo Machine,Object,Count > %log%
for /f "tokens=1" %%i in (Machine.txt) do call :checker %%i
:Checker
Set Machine=%1
Set Count=
cscript action.vbs %1 >Temp.txt
For /F "skip=1 Tokens=1" %%i in (temp.txt) Do Set Count=%%i
FIND /I "Unable to access" TEMP.TXT > NUL
IF NOT ERRORLEVEL 1 SET Status=Unable to Access
:LOGGING
echo %machine%,%count%,%object% >>%log%
goto :EOF
|
|
|
|
|
I still did not get my asnwer...
Problem is :-
when i run my program, and open the particular form for editing the field's value...all d values r shown in the textboxes, but the data of combo box does show which we had selected while inserting the values in d form..so, i want to know the code for setting that problem which can show the data of combo box while the filled form showing its data.
Gurpreet
|
|
|
|
|
rahsi wrote: I still did not get my asnwer...
Maybe you were not clear enough in your question - and perhaps you are double-posting so that the thread you started this question on is now out of sync? Hmmmm???
In any case you have been given direct answers in the past. You should lookup the methods and properties of the ComboBox object (put the cursor over ComboBox in your code and press F1). The method you seek is contained within.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
thanks steve...I need to consult some1 else. be rite back if i fix in some other prob.
Gurpreet
|
|
|
|
|
Ok I'm writing this program just to play Hi-Low Guessing game. I have it so the guessing game part works but I'm having lots of trouble trying to get my counter to work so that when my counter <= 4 it turns on smiley face and when its over it just says congrats you guess the number..
|
|
|
|
|
judamu wrote: I'm having lots of trouble trying to get my counter to work so that when my counter <= 4 it turns on smiley face and when its over it just says congrats you guess the number..
So... what's your code look like and what is the exact problem you are having? Is it that you can't figure out how to set a boolean if the counter is <= 4?
Maybe this will help.
Dim turnOnSmiley as Boolean
turnOnSmiley = False
Dim myCounter as Integer
myCounter = 0
' some program logic...whatever...
turnOnSmiley = (myCounter <= 4)
If turnOnSmiley Then
' turn on the smiley face
Else
' congrats etc...
EndIf
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once '
|
|
|
|
|
Hi. I have been reading through the posts here but cannot seem to find out how to do what I need.
I have a Treeview control with the checkbox option. However, I want to be able to change the color of the check mark from its default black to other colors such as blue or red.
I found some posts regarding customizing "standalone" checkboxes and using the paint method. However, that code doesn't work for the checkboxes in a treeview as it doesn't have all of the properties that the standalone one does.
I have seen this behavior in commercial software but I just cannot figure out how to do it. Can someone point me in the right direction? Any help is appreciated.
-- modified at 18:39 Wednesday 5th April, 2006
No takers yet. Anyone?
|
|
|
|
|
I seem to remember reading somewhere that the VS2005 treeview control has a StateImageList property. I'm not currently using 2005, so I can't be 100% sure if this will do what you want, but the same property of the listview control in 2003 allows you to specify an image list with an unchecked and checked icon.
Having said that, I've had mixed success in actually getting it to work.
|
|
|
|
|
Dear Friends,
I have a Vb6 application with many forms. When I run it in my computer it looks very nice. But when I run it any other computer whose resolution is very high all the forms looks very small. And in some computer whose resolution is very low the forms looks very big. Even the edges of the forms are cut from one side. Can some help me out to make my all forms resolution independent? I mean the size of the form should be same on any computer.
Your quick response will be highly appreciated.
Thanks
Patel Murtuza.
-- modified at 12:31 Wednesday 29th March, 2006
|
|
|
|
|
That's the way it's supposed to work. People use a high resolution so that they can fit more windows into their display. The truth is that your form's pixel width and height hasn't changed (unless you change to large font).
If you must keep the form proportional, regardless of the resolution, then you'll need to set the form's width and height on Form Load. You would calculate width and height based on a percentage. For example, if you wanted the form's width to take up 75% of the screen width, then you would do something like this...
Me.Width = 0.75 * Screen.Width
Problem is that you'll also need to resize/reposition your controls with the form too. You would have to do this in code. There's no designer properties that you can set to do this for you. Now, VB.NET is another story. In VB.NET, all controls have Anchor and Dock properties that'll resize things for you.
|
|
|
|
|
I looking into a way read a user's calendar in exchange and display certain appointments in a list using VB.net 2005. I downloaded the SDK but i don't see a reference in .NET. Can this be done using VB? If anyone has any examples that would be great also. Thanks!
|
|
|
|
|
If mcqRecordset.Fields("iconPath") Is Null Then
imgMCQ.Enabled = False
Else
imgMCQ = LoadPicture(mcqRecordset.Fields("iconPath"))
End If
Object not found... error
plz help me thx
|
|
|
|
|
Keep follow-ups in the same thread, don't post them as new threads too.
---
b { font-weight: normal; }
|
|
|
|
|
in the iconPath field which is found in ythr database.. the path of the image is sotred.. if there is no image path..i/ll display a message no image..
thts why i want to knw.. the syntax to know if my field is empty
Thx
Arshaad
|
|
|
|
|
hi!
I'm doing a project in image processing. I have implemented sobel edge detection.But the edge is not thin.
I tried to implement canny edge detection. But I don't understand how to do non maximum suppression.If anyone has canny edge detection implemented in vb.net please please share it.
signing off is preci
|
|
|
|
|
I don't have that code, but a number of edge detection methods are covered in my image processing articles, which are in C# ( on this site ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello Every body, i have a .swf file its an intro for my application and on loading the application i want it to start.
Any help is appreciated ....... VB.net
I tried to Add the Interop.ShockwaveFlashObjects referrence, but still not workin, they told i have to add AxInterop.ShockwaveFlashObjects but i couldnt found it.
So id like a soultion, and step by step plz.
-- modified at 13:24 Wednesday 29th March, 2006
|
|
|
|
|
the easyest way of doing it is adding a webpage object. create a simple html page that loads the swf and then load the html page into the webpage object.
in vb6 it used to be webpage object.navigate(Path) not sure about .net
|
|
|
|