473,789 Members | 2,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Create Region Form

Hello,
I want to create non-rectengular/region form in
VB.NET. Please Help Me............. .
Jigar Patel
Nov 20 '05 #1
15 7230
"Jigar Patel" <pa**********@h otmail.com> schrieb
Hello,
I want to create non-rectengular/region form in
VB.NET. Please Help Me............. .


I would create the region and assign it to the Form's region property...
Dim gp As New System.Drawing. Drawing2D.Graph icsPath
Dim rgn As Region
gp.AddEllipse(0 , 0, 100, 100)
rgn = New Region(gp)
Me.Region = rgn
gp.Dispose()

--
Armin

Nov 20 '05 #2
Hello,

"Jigar Patel" <pa**********@h otmail.com> schrieb:
I want to create non-rectengular/region form in
VB.NET. Please Help Me............. .


See (complete thread):

http://groups.google.de/groups?selm=...TNGP10.phx.gbl

-- or --

Have a look at the form's 'TransparencyKe y' property (supported on Windows
2000+) (see MSDN documentation).

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #3
Hello Jigar,

This snippet comes courtesy of our Herfried:

Private Sub Form1_Load (ByVal sender As System.Object, _
ByVal e As System.EventArg s) Handles MyBase.Load
Me.Size = New Size (700, 400)
Dim g As New System.Drawing. Drawing2D.Graph icsPath()
g.AddString ("Jigar", _
System.Drawing. FontFamily.Gene ricSansSerif, _
System.Drawing. FontStyle.Bold, _
150, _
New Point (50, 50), _
System.Drawing. StringFormat.Ge nericDefault _
)
Me.BackColor = Color.Red
Me.Region = New System.Drawing. Region(g)
End Sub

Paste this into a new project - you'll love it!! ;-)

Regards,
Fergus
Nov 20 '05 #4
Hello,

"Fergus Cooney" <fi******@tesco .net> schrieb:
This snippet comes courtesy of our Herfried:

Private Sub Form1_Load (ByVal sender As System.Object, _
ByVal e As System.EventArg s) Handles MyBase.Load
Me.Size = New Size (700, 400)
Dim g As New System.Drawing. Drawing2D.Graph icsPath()
g.AddString ("Jigar", _
System.Drawing. FontFamily.Gene ricSansSerif, _
System.Drawing. FontStyle.Bold, _
150, _
New Point (50, 50), _
System.Drawing. StringFormat.Ge nericDefault _
)
Me.BackColor = Color.Red
Me.Region = New System.Drawing. Region(g)
\\\
g.Dispose()
///
End Sub


--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #5
Hi Herfried,

AAAARRGGH

ROFL

But my excuse is that I cut and pasted your example completely. ;-b

Regards,
Fergus
Nov 20 '05 #6
Hello,

"Fergus Cooney" <fi******@tesco .net> schrieb:
But my excuse is that I cut and pasted your example
completely. ;-b


I think the brainconnector has a bug.

;-)

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #7
Cor
Hi Fergus (Herfried)
You did not, even without understanding the code or testing it, I see a red
Jigar in the left uper side in to small letters where was before another
name. You know that this message would come.
:-)))
Cor
Nov 20 '05 #8
LOL
Nov 20 '05 #9
Hi Cor,

I've been rumbled* :-(

Sure I tested it. :-) When I tried the original it was small so I made
this one bigger for Jigar and, as you spotted, used his name. (That's why I
think he'll love it!)

But each time Herfried reminds me, it sinks into my brain a bit better.
:-)

Lol

Regards,
Fergus

* rumbled - discovered, caught out.
Nov 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
6673
by: 2003et | last post by:
How To Create Transparent Windows Controls? Thanks
2
1844
by: strout | last post by:
It's a pain to create each button with 2 images: button_on.gif button_off.gif I am looking for a control that have on/off two states, preferred as BACKGROUND images and with button text on it. Any hint?
13
8878
by: Daniel Walzenbach | last post by:
Hi, Imagine the following situation: I have an asp.net application which allows uploading files to a SQL Server 2000 database (Files are stored as type "images"). As a next step I would like to implement some way to enable downloading those files from the database which leads me to the following two problems: 1.) How can I create a file "in memory" as I don't want to create temporary files stored on my web server and
11
2204
by: Özden Irmak | last post by:
Hello, In my VB.Net application I create a new instance of my form like : NewForm = new MyNewForm() But with this line, this new form is automatically shown. I want it to be hidden at the start... Adding a line after this line like :
5
5433
by: Wonder | last post by:
How can I create or use the msgobx to show a message without a default button. The user has explicity to click on the button, so the msgbox closes it. Thanks,
9
6527
by: S Wheeler | last post by:
Hi all - I am trying to create an instance of a vb .net class containing a form from unmanaged vc++. The vb.net is a dll. How to do this ? I am trying #import by can't seem to get it quite right. I suspect this is quite simple though. Thanks in advance...
0
1441
by: Kristian Frost | last post by:
Hi, I'm just getting started with VB.Net, and I'm having trouble getting the routing around of some of the data straight in my mind, which has led me to the following problem. Basically, I'm trying to create an object that will monitor the status of some switches. I created a User Control to put into a form, on which I want to have five graphical representations of LEDs, which I've got working, light up and turn off when the...
4
6916
by: Vlad | last post by:
I am having problems using the file.create method within a function that is called when looping through an array of filepaths. If I call my function with a hardcoded file path --C:\Temp.txt the function creates the file as expected. When I loop through my array I get the error - "ArgumentException was unhandled - Illegal characters in path" The value "C:\Temp.txt" is the first value in the array - as it works
4
11656
by: wutang | last post by:
Create a program that displays the sum of the sales amounts made in each of four regions (North, South, East, West) during a three month period. The program should display the total sales made during the three months. 1. Complete the program by entering the C++ code that allows the user to enter four sets(one set for each region) of three sales amounts (one sales amount for each month). The program should display each region's total sales for...
0
9506
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10404
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10193
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10136
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9016
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5548
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4089
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3695
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.