|
Yeah, you really can't do that. But there is a method that works using Base64. Check out the System.Convert class. You'll find a couple of methods very useful for what your doing. Convert.ToBase64String will convert an array of 8-bit unsigned integers (or Byte) to a Base64 string. You can then use Convert.FromBase64String on the resulting string to get back your original array of Byte's.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
does anyone have or know of some basic bookkeeping source code that i could use to make a personal program on visual studio.net
|
|
|
|
|
I suggest you to take a look at http://msdn.microsoft.com/archive/default.asp and search the key word of your program. I've often found code that helped me to create my application.
Sorry for my bad english
Bye Klaus![Smile | :)](https://www.codeproject.com/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
For source code, I don't know of any, but you might want to try using Googling for "bookkeeping source code". You might find something that you can use.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How do you expose your Application's Object Model?
|
|
|
|
|
Code it up as a collection of COM Objects. Each one exposes some functionality, and they work together to make the App work. the objects themselves can then be accessed individually.
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
I found a small problem in using Visual Basic 6.0 to show a background image in treeview, could someone help me?
|
|
|
|
|
The TreeView control doesn't support a background image. You'd have to write your own TreeView control, from scratch, to get this functionality. You might want to checkout Infragistics[^] controls for a replacement.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I have a problem with tree view. I want to display tree view from
right to left instead of left to right but The rtl property doesn't work
correctly. Can you help me to overcome the problem?
|
|
|
|
|
You never mentioned what the actual problem is. All you said was, "it's broken"... What's the actual problem and what do you want it to do?
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The actual problem is that persian language is written from right to left.
So I want to have a tree to be expanded from right of the screen to the
left but I dont know how to do it. I have the same problem with toolbar component.
|
|
|
|
|
Well, after a bit of digging, I've figured out that the TreeView control doesn't support drawing the tree right to left, but does support right to left text alignment. Same with the Toolbar. It looks like a large bunch of the controls don't support drawing right to left, other than text alignment.
You can implement what's called 'Mirroring' in code to get the TreeView to showup drawn right to left. There is an example of it here[^] on CodeProject, but the process is not documented in the article. You'll have to look at the code to figure it out. But, that article lists a BUNCH of controls and their right to left support.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I found a small problem in using vs.net to create a application,could someone help me? Thanks!
Last time when I create a toolbar in my application---I just use the normally way to create it. It seems work well,but when I enable the Windows XP visual style,it won't work: I found no icons in the toolbar! I just use the only one word: System.Windows.Application.EnableVisualStyle .
I try this in another language:C++ or c#,the same problem occur!
Could someone help me?
|
|
|
|
|
I am at the end of creating a wizard to install MDAC, MSDE, restore a database and then back it up. aaaaarrrggh what a.......!!
What the issue is, is that the MSDE install is in the middle and requires a re-boot so i have added some reg keys to kick off the wizard when it comes back up in the run-once key.
When it comes back up it says the "file is not found 53" and doesn't start the wizard obviously. What am i doing wrong?
The key added holds the value G:/MSDESetup.exe as this is where the exe is stored.
Any help greatly appreciated....
Many Thanks
Harry
|
|
|
|
|
Is the G: drive is a network mapped drive? You might want to try moving the startup for the wizard into the user's Programs/StartUp menu instead of RunOnce. The drive might not exist when the RunOnce key is parsed and executed.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi friends.. again with a short question.. here i am ... Well I placed a tool bat at my MDI form... but as soon as i place a background image at that main MDI form.. that also starts behaving as a background image to that toolbar too... I dunno why is soo.. it went ok a few days earlier..
but now i deleted the tool bar.. placed it again.. still the same problem..and this problem occurs when i put buttons on the toolbar...???
how is it happening...? how to prevent that image to be displayed on toolbar...???
tahir
|
|
|
|
|
Printing in VB is a mess.
I'm trying to print 2 sides of the paper in stead of one (I now use printform)
With this function it is not possible to do so....
I need to send more than one form at once to the printer (as one Printjob), but i have no clue how to do this, without the loss of quality.
Can anyone help me?
thnx
Maverick
|
|
|
|
|
I have created a secure shell in VB that sits in place of the desktop. In this shell there are a number of icons, which when clicked on run up the specified application. This then logs time spent in the application. When it finishes I then just note the time down and work out the elapsed time. However to find when the application finishes I have created a loop that checks whether the application has terminated. So far so good. But now the problem I have is that every 15 minutes I want to create a file of the time spent in each of the applications and send it off to another machine. The timer control in VB will only go on for 1 minute before having to reset it, so thats not really good. I could implement a C++ program to run a timer but then I have the problem in intergrating the two codes together, as the C++ will not know the contents of the variables in the VB application. I had thought about writing the data out to a file as I go (created and opened in the VB code), but then the C++ timer could cause problems in trying to close the file down, and also I would not be able to rest the variables in the VB code easily. Obviously I would like to keep all the code in VB if I could. Also does the timer allow you to come out of the loop that I may be in whilst waiting for a currently running application to finish, and then go back into the loop.
Any help would be great. Thanks
Simon Kearn (simon.kearn@lmco.com or simon.kearn@ntlworld.com)
|
|
|
|
|
Why now just write your reporting app (in VB of course) without any timer support, then just have the Windows Scheduler Service (Scheduled Tasks) kick off the app every 15 minutes. You could even schedule it to run between the hours of whatever to whatever and on what days.
This would, of course, require that you keep your information in a file as it's being created...
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dim i as Integer 'In your init routine
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e _
As System.EventArgs) Handles Timer1.Tick
i += 1 'Increment for each minute - Interval set to 60,000
If i > 14 Then
'Do your file stuff here as 15 minutes have elapsed
i=0
End If
End Sub
If "to err is human", programmers must be superhuman...
|
|
|
|
|
Thanks for that.
On the other issue; if I am in a loop at the time of the timer Interval expiring. Will I get returned back into the loop once the timer procedure has been completed. Can't seem to find any info on whether this will happen or not.
Ta, Simes
|
|
|
|
|
You'll never actually leave the loop. You MUST put a Application.DoEvents in the loop, somewhere where it will execute fairly often, so your app will get the Timer Tick events and be able to process them. As a general rule, without the DoEvents, your app will stay in the loop and only execute the stacked up events when the loop terminates and the function that it's in gives up control to the GUI again.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Has anyone ever used IDispatch in one of their .NET apps? I'm trying to progmatically naviate to a website using the AxWebBrowser1 and download images that are on the page. I can get to the page and acquire the paths to the images but I can't save them. They are either tif images or pdf images depending on the site. I tried using the SAVEAS in the ExecWeb method. It saves the file but I can't open the image. Plus, even though I have the DONTPROMPTUSER settiing, it still prompts. So, I've been reading that you can create your own interfaces with IDispatch and IUnknown but I have no clue as to how to even start or if I'm going down the wrong path.
Please help![D'Oh! | :doh:](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_doh.gif)
|
|
|
|
|
IDispatch is a little extreme for what you want to do.
You were on the right path with SAVEAS, but as you've found out, the WebControl will ask the user to pick the filename not matter what you try and save. This is, of course, a security reason. We don't want an app just saving thousands of copies of image to your machine without you knowing, do we?
You can use the URLDownloadToFile function, found in URLMON.DLL, to get around this:
Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
"URLDownloadToFileA" (ByVal pCaller As Integer, ByVal szURL As String, ByVal _
szFileName As String, ByVal dwReserved As Integer, ByVal lpfnCB As Integer) As Integer
The docs on URLDownloadToFile are here[^].
There is a good example of it here[^], and the short KB Article on it here[^].
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank you. I'll take a look at your examples that you attached. I can't seem to get it to pull the image so I'm wondering if it has something to do with how the image is on the server. Does it have anything to do with converting the path to an absolute address? If so, what is that and why would you need to resolve a URL to an absolute path?
|
|
|
|