|
-
Apr 27th, 2004, 02:16 AM
#1
figure out if app is running in debug mode?
is ther a way to do that with code? I wanna know if my app is running in debug mode or release mode
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Apr 27th, 2004, 07:02 AM
#2
Hi Mr. Polite.
After a (big) bit of tinkering, I finally came up with this.
VB Code:
Dim a As Reflection.Assembly = Reflection.Assembly.GetExecutingAssembly
Dim o() As Object = a.GetCustomAttributes(GetType(System.Diagnostics.DebuggableAttribute), True)
If o.Length > 0 Then
MsgBox("Debug Mode")
Else
MsgBox("Release Mode")
End If
Strange thing is, that when searching in the help, they claim that there is a DefineDebug property, but that's nowhere to be found.
The FileVersionInfo has a IsDebug property, which apparently always returns false, so that's not much use either.
But as far as I can tell, the above solution appears solid.
Enjoy.
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
-
Apr 27th, 2004, 08:21 PM
#3
Originally posted by pax
Hi Mr. Polite.
After a (big) bit of tinkering, I finally came up with this.
VB Code:
Dim a As Reflection.Assembly = Reflection.Assembly.GetExecutingAssembly
Dim o() As Object = a.GetCustomAttributes(GetType(System.Diagnostics.DebuggableAttribute), True)
If o.Length > 0 Then
MsgBox("Debug Mode")
Else
MsgBox("Release Mode")
End If
Strange thing is, that when searching in the help, they claim that there is a DefineDebug property, but that's nowhere to be found.
The FileVersionInfo has a IsDebug property, which apparently always returns false, so that's not much use either.
But as far as I can tell, the above solution appears solid.
Enjoy.
haha thank you sorry for the trouble
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|