|
Look into Docking and Anchor properties of your controls.
There are some articles here on CP that may be useful, try searching.
Delay due to speed demand - I mean you really need to read the forum guidelines before posting!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
i have a form where there is a control to load a word document.
for example on button click opendialogue file to select the document and parse it back to the textbox and then save it to the database..mind you it will be in byte..
please give me a code sample to do this.
thanks
|
|
|
|
|
waner michaud wrote: please give me a code sample to do this.
I suggest you read the guidelines on how to ask a question - this request just irritates those who answer.
waner michaud wrote: parse it back to the textbox
Why do you want to do this, you will lose any formatting in the word document. Then you intend to save it back to the database as a binary. Do a search on saving documents to SQL Server. I did this recently and found some excellent examples.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Using VB 2008 Express and MySQL 5.1.36 community server I created a database application whose idea is to keep some data about digital pictures (place taken, description, filepaths for the picture and so on). Works well to suite my needs. Through the app I can also create backupfiles using mysqldump. It is a standalone app. supposed to be used locally. MySQL uses MyIsam not InnoDb.
Via the mysql commandline it is possible to restore the database using the backupfile like this:
"mysql> source C:/dump.sql; " and that also works for a more complex path with more slashes in. It does not work with underscores in the path (or I did not bother to find a solution, I changed the actual paths instead to avoid that problem.)
Via the command line it also works like this:
"mysql> source C:\dump.sql;" however the beep sounds but the restoration takes place. So best use is the forward slashes /// in the first example to avoid the beeping.
The dump file is written to Create Database if not exists and the corresponding drop tables if exists is there. As I said, the dump file works to restore by the commandline.
Through VB then? Not a chance so far. I have read TFM but it doesn't have much to say. Google has been used but without success so far.
Friend Sub RestoreIt()<br />
Dim ArgumentString As String, UserString As String, PasswordString As String <br />
Dim str4Q As String = """"<br />
Dim p1 As New ProcessStartInfo, FilePath As String = App_Path()<br />
FilePath = Replace(FilePath, "\", "/")<br />
Dim DumpFile As String = FilePath & "dump.sql"<br />
UserString = "root"<br />
PasswordString = "blabla"<br />
ArgumentString = " --user=" & UserString & " --password=" & PasswordString & " source " & DumpFile<br />
<br />
Try<br />
With p1<br />
.UseShellExecute = False<br />
.FileName = "C:\Program\MySQL\MySQL Server 5.1\bin\mysql.exe"<br />
.Arguments = ArgumentString<br />
End With<br />
Process.Start(p1)<br />
<br />
Catch ex As Exception<br />
MessageBox.Show(ex.Message, _<br />
Me.Text, _<br />
MessageBoxButtons.OK, _<br />
MessageBoxIcon.Error)<br />
End Try<br />
<br />
End Sub<br />
Public Function App_Path() As String<br />
Return System.AppDomain.CurrentDomain.BaseDirectory()<br />
End Function<br />
The process starts but nothing happens. I dont know how to go on. Is it possible to read the process line by line and see where the errors occcurs? It rolls on like an thunderstorm with some lines. Or does someone have an direct answer to solve my problem? Where the dumpfile is located could not be the problem cause it works from the commandline from different locations such as C:/dump and C:/Whatever/Dump/Anotherdump/dump.sql
I tried with and without the """" (as in str4Q) before and after the filevariable but nothing works. Those four quotes is necessary when creating the dumpfile via mysqldump. I have also tried to write a batch file to run instead of the System.Process but no result.
As could be seen in the code I have replaced the back slashes with forward slashes. Tried the opposite and also with double slashes but no result.
Any hints are more than welcome,
leif, sweden
|
|
|
|
|
Finally, a nightly session with Google did it.
Thanks to the signatur "Guid" in the posted link here and his C# solution which was easy adaptable to VB.
http://social.msdn.microsoft.com/forums/en-US/adodotnetdataproviders/thread/def0ec15-45e7-47a0-95ca-c813a8f8072d/[^]
In the above linked forum it also suggests to use a stored procedure within MySQL. Has to be tested...
But this code did it. Two namespaces had to be imported as well as a DLL import of "kernel32.dll".
Directory for batfile must exist. No error handling yet.
Imports System.Runtime.InteropServices<br />
Imports System.Text<br />
Public Class Admin<br />
<br />
<DllImport("kernel32.dll", CharSet:=CharSet.Auto)> Public Shared Function GetShortPathName(ByVal lpszLongPath As String, ByVal lpszShortPath As StringBuilder, ByVal cchBuffer As UInt32) As UInt32<br />
End Function<br />
<br />
Friend Sub DeKomp()<br />
Dim buffer As New StringBuilder(256)<br />
GetShortPathName(Path.GetDirectoryName("C:\Program\MySQL\MySQL Server 5.1\bin\mysql.exe"), buffer, buffer.Capacity)<br />
Dim shortfilename As String = buffer.ToString<br />
Dim batchfile As String = "c:\XBatch.bat"<br />
Dim sw As New StreamWriter("c:\XBatch.bat")<br />
sw.WriteLine("cd " + shortfilename)<br />
sw.WriteLine("mysql -uroot -pXXXX testbDB< C:/VB9/MyBkUps/Data/dump.sql")<br />
sw.Flush()<br />
sw.Close()<br />
Environment.CurrentDirectory = "c:\windows\"<br />
Process.Start(batchfile)<br />
End Sub<br />
End Class
|
|
|
|
|
Hi All,
I am Coping data from System Drive and i m tring to Paste in Removeable media.
So i want to get the Source path of file which is paste in Removable media.
Thanks
If you can think then I Can.
|
|
|
|
|
eg_Anubhava wrote: I am Coping data from System Drive and i m tring to Paste in Removeable media.
So i want to get the Source path of file which is paste in Removable media.
From where do you copy paste, and what do you acctualy want to do? I don't understand a thing.
Didi
|
|
|
|
|
When i am trying to Paste information from my clipboard at this time i want to know that what is the location where from data is Coping ?
If you can think then I Can.
|
|
|
|
|
0) What have you tried? (we don't just give you the entire program you know)
1) Please explain a little bit better.
1.1) is there a user interface (I'm guessing yes)?
1.2) are you using a openfiledialog to determine your original file or not?
1.3) are you using a savefiledailog to determine the destination or not?
2) look at the following namespaces:
2.1) system.io.file
2.2) system.io.path
2.3) system.io.directory
3) Your really going to have to explain your question better and post what you have try'd so far.
|
|
|
|
|
I have a USB drive which i want to monitor.At this time when i am copy the data and Paste in USB Drive i want to know the main source of coping data.
I want to know the main source of data where from it copied.
if u have any solution or idea please help.
Thanks
If you can think then I Can.
|
|
|
|
|
Unless your program is doing the copying I don't think you can find the original path of the data.
|
|
|
|
|
Since the copy originator can be anything, there's no way to find out who's copying what files from where.
|
|
|
|
|
Any body know how to run application of Visual Basic 2005/2008 Express Edition when computer start up....?
Best Regards,
Ahmad Rifai Yusuf
|
|
|
|
|
Put the shortcut in Start folder.
|
|
|
|
|
Add a string value under HKEY_LOCAL_MACHINE\software\Microsoft\Windows\CurrentVersion\Run with data equal to your app executable path.
Life is a stage and we are all actors!
|
|
|
|
|
hi all,
i want to import contact list from Gmail,Yahoo or Hotmail which is provided with email and password .
i know there are such a method since i see this functionality in different sites.
can anybody provide me some code snippet or useful link
|
|
|
|
|
For GMail, you can make use of Google Contact API[^].
For rest, I guess there should be something similar. You can also check out this[^] link.
Hope it helps.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Hi All,
I am tring to create a small application Screen Recorder in video format. Please give me the idea for doing this.
I try it by using Windows Encoder and DirectX.But i do not want to use any others Software Component.
Is this possible create video from Images.
Please suggest me.
Thanks
If you can think then I Can.
|
|
|
|
|
The most universal way to capture the screen and next write the result into file is using DirectX.You have to use Microsoft Screen Capture filter as source filter.Next just add renderers and grabbers to your graph as needed.You could use DirectShowLib to access DirectX from VB.NET of C#.Test the graph configuration with GraphEdit.
Life is a stage and we are all actors!
modified on Friday, August 21, 2009 9:26 AM
|
|
|
|
|
is Directsohwlib is free for use.
If you can think then I Can.
|
|
|
|
|
It's under LGPL.You could learn more about this license here.
Life is a stage and we are all actors!
modified on Friday, August 21, 2009 8:31 AM
|
|
|
|
|
You could find sample here for screen capture in a movie with WME.
Life is a stage and we are all actors!
|
|
|
|
|
I check this article author used the windows media encoder for capturing activity. So Windows Media Encoder is must compulsory for that.
I want to indipendent (Without using any other software need) development.
If you have any idea I am waiting.
If you can think then I Can.
|
|
|
|
|
How would I extract the informatiom from html code...
I want to extract the table data and display it tabpage w/gridview. I need the table headers,
the URL's for the images, weather discriptions(Partly Cloudy, PM T-Storms, etc..) and the 5 day highs and lows. How would I go about getting the data I described?
The web page is the Yahoo rss feed, lines 280 to 299. This is the 5-day forecast.
THNX in advance for the help.
rspercy
If "You wash your feet and find a pair of socks " Then
"You ARE a Redneck"
End If
|
|
|
|
|
Hi,
1. you get the HTML code in one of many ways, e.g.:
- use WebBrowser, set URL, get DocumentText
- use HttpRequest and HttpResponse
2. having one huge string, extract what you need, in one of many ways, e.g.:
- if it is strict XML, you could use XmlDocument or XPath (don't ask me for details!);
- if not: if you are proficient in regex, use it;
- otherwise, use String methods, such as IndexOf and Substring.
Whatever you do, be aware that you are relying on how it is constructed now, which may change at any time; with strict checking you may avoid false results and will fail sooner, with more relaxed matching, you may fail without knowing it and return false information.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|