|
I don't know if VB's the best way to do that.
Try XNA
|
|
|
|
|
Christian already gave you the correct answer to your question here[^]. Asking the same question again will not change the answer.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
WPF (.NET 3.0) includes support for 3D.
|
|
|
|
|
Hi everybody.
I have a website where users can upload their pictures. I need to automatically add the name of my website to any uploaded picture. is that possible? and How?
Thanks in advance...
OmarMallat
|
|
|
|
|
Create a MemoryStream from the uploaded data, so that you can load the image into a BitMap object. Create a Graphics object for the bitmap so that you can draw on it. Save the BitMap to a file.
---
single minded; short sighted; long gone;
|
|
|
|
|
ok, but can you give me how to write to an image? and how to save it again? this is my question
OmarMallat
|
|
|
|
|
Use the Graphics.FromImage method to create a Graphics object for the image. The Graphics object has method that you can use to draw anything you want on the image, like text, shapes and other images. Use the Save method on the image to save it when you are done drawing on it.
---
single minded; short sighted; long gone;
|
|
|
|
|
ok, but I'm new in web development. in windows application it's easy to do that, but in web development how to put an exe file on the server to perform this task?? and how to call this exe? and how the exe can save directly to the server? or there is another concept?
the view about this is not very clear...
OmarMallat
|
|
|
|
|
You don't have to do this in a separate program at all. The entire framework is available from within ASP.NET.
---
single minded; short sighted; long gone;
|
|
|
|
|
sorry but I can't understand how..
let we have a simple example.
I need to make a copy of each uploaded file..
in windows application: filecopy source, destination
build, and double click to copy the file
in web what should I do?
please, do not say that I'm stupid... but I don't know...
OmarMallat
|
|
|
|
|
It works exactly the same in a web application. Put the code in the page, deploy the application, browse to the page.
There is one difference, though. The working directory is not the folder of the web application, so you have to use complete file paths. The Server.MapPath method gives you the physical path of a virtual address.
---
single minded; short sighted; long gone;
|
|
|
|
|
Another option would be to create a custom HttpHandler that watermarked the images "on-the-fly". That way, you don't have to modify the original image stored on your server. The watermark can be added as the picture is being sent to the client browser.
See this[^] article for an example. It starts about half way down the page.
There's also some information in there about stopping images from being leeched from your site without using the page that the image is a part of.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
I was wandering if there was any way to supply a new set of arguements to an already running process using vb or any other language whether it be dos, c++ or c# ?
I have a program i have written that not only edits files but launches a program with a set of arguements from the user, and this works fine but i want to add functionality to my program by adding a way to change the arguements supplied to the process without haveing to shut the entire process down.
|
|
|
|
|
I think you can use some sort of IPC (Inter Process Communications) or, if your process has access to shareable resources (such as files or databases), it can poll for changes there.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
I appreciate the input, im currently researching the ipc and how this may help my application along. Basically the program allows users to launch a specific executable and use information from ini files (user specified) to pass arguements to the process prior to launching (thus avoiding writing multiple bat files). But after the process is launched the user pretty much looses control of that executable (this is the manufactures fault) and im trying to find a way to give some control back to the user. Basically what im trying to accomplish is getting the process to restart (without shutting down completely) with a new set of arguements thus giving it more functionality.
As i just started reading the about ipc i havent quite come to the conclusion if this will be what i need or not, i have seen that it has the ability to pass info thru networks ect... but havent gotten all the time to read more into it.
If anyone knows how ipc works or any other way to accomplish my task i would appreciate the input.
Thanks in advance
|
|
|
|
|
BTW you can also change the values inside the INI file. But then your process has to periodically check the INI file for changes.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
I have buttons in my menu strip on my MDI parent form. How can I center these buttons on the menu strip???
|
|
|
|
|
I have buttons in my menu strip on my MDI parent form. How can I center these buttons on the menu strip???
|
|
|
|
|
Sorry, this should be obvious, but I don't know it.
How do I pause my program execution until another event fires?
Thanks
|
|
|
|
|
you have to do nothing, a Windows application sits down waiting for the next event...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
In my program, when a specific action is taken, the form generates a tablelayoutpanel. this table layout panel requires, in different circumstances, to have a different amount of cells. The cells need to be of equal size. How would i go about this? I have no idea how to programatically set the amount of rows and columns, is there a way?
Posted by The ANZAC
|
|
|
|
|
Hi,
Could anyone help me?
I'm trying to set a text box so the contents scrolls across the screen (right to left - like a news ticker). I've found some part examples using picture boxes, but was hoping for something more basic, with just a textbox/label etc - and a timer. It doesn't matter if the motion is jerky - so long as it works!
I was thinking it would be something like sending the text to a temp location then on a timer tick it changes whats in the text box so everything it one/two characters further over. I'll need to make sure the whole message is displayed before the first letter reappears at the start.
Any help would be much appreciated
I'm using Visual Studio 2003 (VB.net)
Many thanks
Matt
|
|
|
|
|
Might be a bit messy, but i did throw it together in a couple of mins so...:
Dim text As String
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
text = Me.Label1.Text<br />
End Sub
Dim leftbound As Integer = -1<br />
Dim Right As Boolean<br />
<br />
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick<br />
If Me.Label1.Text = "" Then<br />
Me.Label1.Location = New Point((Me.Width - leftbound), Me.Label1.Location.Y)<br />
Right = True<br />
End If<br />
If Me.Label1.Location.X = leftbound Or Me.Label1.Location.X = leftbound + 1 Then<br />
If Me.Label1.Text <> "" Then<br />
Me.Label1.Text = Label1.Text.Remove(0, 1)<br />
End If<br />
Right = False<br />
ElseIf Me.Label1.Text = text Then<br />
Right = False<br />
Me.Label1.Location = New Point(Me.Label1.Location.X - 2, Me.Label1.Location.Y)<br />
ElseIf Right = True Then<br />
If Me.Label1.Text.Length + 1 <= text.Length Then<br />
Me.Label1.Text = text.Remove(Me.Label1.Text.Length, text.Length - (Me.Label1.Text.Length + 1))<br />
Me.Label1.Location = New Point(Me.Label1.Location.X - 1, Me.Label1.Location.Y)<br />
End If<br />
End If<br />
End Sub
Posted by The ANZAC
|
|
|
|
|
Thanks, I've tried that - however it isn't quite what I was after. The label box in that example has to be big enough for the for the entire message els it wont all be displayed. Say the label is wide enough for 30 characters, but the message is 45 - is there a way to scroll the entire message across the box before restarting?
Thanks for your help
|
|
|
|
|
Maybe save the trouble and download a marquee control, i'm sure there are plenty available,
Posted by The ANZAC
|
|
|
|